<?php

declare(strict_types=1);
/**
 * Created by PhpStorm.
 * User: yangfan
 * Date: 2019/10/31
 * Time: 2:32 PM
 */

namespace App\Services\api;

use App\Entity\AreaEntity;
use App\Entity\UserAddressEntity;

interface ILocationService
{
    /**
     * @return AreaEntity/null
     */
    public function getCityById(int $cityId);

    /**
     * @return AreaEntity/null
     */
    public function getCityByAreaName(string $areaName);

    /**
     * 通过 cityId 查找城市名称
     *
     * @return string
     */
    public function getCityNameById(int $cityId);

    /**
     * 返回城市名
     *
     * @param string $cityIds 格式 '1，4，5，111'
     *
     * @return string
     */
    public function getCityNamesByIds(string $cityIds);

    /**
     * 获取最近使用的地址
     *
     * @return UserAddressEntity
     */
    public function getLastSetUserAddress(int $userId);

    /**
     * 获取默认地址
     *
     * @return UserAddressEntity
     */
    public function getDefaultUserAddress(int $userId);
}
